<style>
  div {
    position: relative;
    margin: 50px auto;
    width: 100px;
    height: 100px;
    box-sizing: border-box;
    border: 1px solid #333;
    line-height: 120px;
    text-indent: 5px;
  }

  div::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 50px;
    box-sizing: border-box;
    border-bottom: 1px solid deeppink;
    transform-origin: bottom center;
    transform: rotateZ(45deg) scale(1.414);
  }
</style>

<div></div>